//
//  SmsCloudRecordHeadView.m
//  smsCloud
//
//  Created by 蓝鳍互娱 on 2024/7/22.
//

#import "SmsCloudRecordHeadView.h"

@implementation SmsCloudRecordHeadView
-(instancetype)init{
    if (self == [super init]) {
        self.backgroundColor = [SmsCloudHead SmsCloudColorHexString:@"#F0F3F6"];
        [self smsCloudInitView];
    }
    return self;
}
- (void)smsCloudInitView{
    UIImageView* smsCloudPhoneAlertImgView = [[UIImageView alloc] init];
    smsCloudPhoneAlertImgView.userInteractionEnabled = YES;
    smsCloudPhoneAlertImgView.image = [SmsCloudHead SmsCloudImageNamed:@"smsCloudPhoneAlert"];
    smsCloudPhoneAlertImgView.contentMode = UIViewContentModeScaleToFill;
    [self addSubview:smsCloudPhoneAlertImgView];
    [smsCloudPhoneAlertImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:29]));
        make.left.equalTo(@([SmsCloudHead SmsCloudScreewRatio:24]));
        make.height.equalTo(@([SmsCloudHead SmsCloudScreewRatio:34]));
        make.width.equalTo(@([SmsCloudHead SmsCloudScreewRatio:34]));
    }];
    UILabel * smsCloudPhoneAlertLab = [[UILabel alloc] init];
    smsCloudPhoneAlertLab.textColor = [SmsCloudHead SmsCloudColorHexString:@"#444444"];
    smsCloudPhoneAlertLab.text = @"注意：请确保已经在注册平台发送验证码成功后，在此处才能查询到验证码，国家不同会有一定的时间延迟，大概3~5分钟";
    smsCloudPhoneAlertLab.font = [UIFont systemFontOfSize:[SmsCloudHead SmsCloudScreewRatio:30] weight:UIFontWeightRegular];
    smsCloudPhoneAlertLab.numberOfLines = 3;
    [self addSubview:smsCloudPhoneAlertLab];
    [smsCloudPhoneAlertLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:29]));
        make.right.equalTo(@(-[SmsCloudHead SmsCloudScreewRatio:23]));
        make.left.equalTo(smsCloudPhoneAlertImgView.mas_right).offset([SmsCloudHead SmsCloudScreewRatio:19]);
        make.height.equalTo(@([SmsCloudHead SmsCloudScreewRatio:108]));
    }];
}
@end
